package cho114366.swing;

import java.awt.BorderLayout;
import java.awt.FlowLayout;

import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.GroupLayout;
import javax.swing.GroupLayout.Alignment;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JTextField;
import javax.swing.LayoutStyle.ComponentPlacement;

public class Group_Layout01 extends JDialog {

	private final JPanel User_Insert = new JPanel();
	private JTextField textField;
	private JTextField textField_1;
	private JTextField textField_2;
	private JTextField textField_3;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		try {
			Group_Layout01 dialog = new Group_Layout01();
			dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
			dialog.setVisible(true);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	/**
	 * Create the dialog.
	 */
	public Group_Layout01() {
		setTitle("사용자 등록");
		setBounds(100, 100, 640, 480);
		getContentPane().setLayout(new BorderLayout());
		User_Insert.setBorder(new EmptyBorder(5, 5, 5, 5));
		getContentPane().add(User_Insert, BorderLayout.CENTER);
		JLabel uid = new JLabel("아이디");
		uid.setFont(new Font("돋움", Font.BOLD, 15));
		textField = new JTextField();
		textField.setColumns(10);
		JLabel label = new JLabel("비밀번호");
		label.setFont(new Font("돋움", Font.BOLD, 15));
		textField_1 = new JTextField();
		textField_1.setColumns(10);
		JLabel label_1 = new JLabel("비밀번호 확인");
		label_1.setFont(new Font("돋움", Font.BOLD, 15));
		textField_2 = new JTextField();
		textField_2.setColumns(10);
		JLabel label_2 = new JLabel("사업자번호");
		label_2.setFont(new Font("돋움", Font.BOLD, 15));
		textField_3 = new JTextField();
		textField_3.setColumns(10);
		JButton btnNewButton = new JButton("중복확인");
		JLabel lblNewLabel = new JLabel("- 제외 입력");
		JButton btnNewButton_1 = new JButton("등록");
		GroupLayout gl_User_Insert = new GroupLayout(User_Insert);
		gl_User_Insert.setHorizontalGroup(
			gl_User_Insert.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_User_Insert.createSequentialGroup()
					.addGap(101)
					.addGroup(gl_User_Insert.createParallelGroup(Alignment.LEADING)
						.addGroup(gl_User_Insert.createSequentialGroup()
							.addComponent(label_1, GroupLayout.PREFERRED_SIZE, 100, GroupLayout.PREFERRED_SIZE)
							.addPreferredGap(ComponentPlacement.UNRELATED)
							.addComponent(textField_2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
						.addGroup(gl_User_Insert.createSequentialGroup()
							.addComponent(label, GroupLayout.PREFERRED_SIZE, 71, GroupLayout.PREFERRED_SIZE)
							.addGap(41)
							.addComponent(textField_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
						.addGroup(gl_User_Insert.createSequentialGroup()
							.addGroup(gl_User_Insert.createParallelGroup(Alignment.LEADING)
								.addGroup(gl_User_Insert.createSequentialGroup()
									.addComponent(uid, GroupLayout.PREFERRED_SIZE, 71, GroupLayout.PREFERRED_SIZE)
									.addGap(41)
									.addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
								.addGroup(gl_User_Insert.createSequentialGroup()
									.addComponent(label_2, GroupLayout.PREFERRED_SIZE, 108, GroupLayout.PREFERRED_SIZE)
									.addPreferredGap(ComponentPlacement.RELATED)
									.addGroup(gl_User_Insert.createParallelGroup(Alignment.LEADING)
										.addComponent(btnNewButton_1, GroupLayout.PREFERRED_SIZE, 152, GroupLayout.PREFERRED_SIZE)
										.addComponent(textField_3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))))
							.addGap(30)
							.addGroup(gl_User_Insert.createParallelGroup(Alignment.LEADING)
								.addComponent(lblNewLabel)
								.addComponent(btnNewButton))))
					.addGap(121))
		);
		gl_User_Insert.setVerticalGroup(
			gl_User_Insert.createParallelGroup(Alignment.LEADING)
				.addGroup(gl_User_Insert.createSequentialGroup()
					.addGap(63)
					.addGroup(gl_User_Insert.createParallelGroup(Alignment.TRAILING)
						.addComponent(btnNewButton)
						.addComponent(uid)
						.addComponent(textField, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))
					.addGap(27)
					.addGroup(gl_User_Insert.createParallelGroup(Alignment.LEADING)
						.addGroup(gl_User_Insert.createSequentialGroup()
							.addGap(15)
							.addComponent(label, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE))
						.addGroup(gl_User_Insert.createSequentialGroup()
							.addGap(12)
							.addComponent(textField_1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))
					.addGap(38)
					.addGroup(gl_User_Insert.createParallelGroup(Alignment.LEADING)
						.addComponent(textField_2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addGroup(gl_User_Insert.createSequentialGroup()
							.addGap(3)
							.addComponent(label_1, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE)))
					.addGap(39)
					.addGroup(gl_User_Insert.createParallelGroup(Alignment.BASELINE)
						.addComponent(label_2, GroupLayout.PREFERRED_SIZE, 18, GroupLayout.PREFERRED_SIZE)
						.addComponent(textField_3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)
						.addComponent(lblNewLabel))
					.addGap(50)
					.addComponent(btnNewButton_1)
					.addContainerGap(60, Short.MAX_VALUE))
		);
		User_Insert.setLayout(gl_User_Insert);
		{
			JPanel buttonPane = new JPanel();
			buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT));
			getContentPane().add(buttonPane, BorderLayout.SOUTH);
			{
				JButton okButton = new JButton("확인");
				okButton.setActionCommand("OK");
				buttonPane.add(okButton);
				getRootPane().setDefaultButton(okButton);
			}
		}
	}

}
